import { Action } from "@/mdesign-lib/mdesign-app.umd.js";
import { DiagramType } from "@/mdesign-lib/mdesign-app.umd.js";
import { GraphTab } from "@/mdesign-lib/mdesign-app.umd.js";
import { ActionKey } from "@/mdesign-lib/mdesign-app.umd.js";

export class Casic3TablePreviewAction extends Action {
  keyName = "Casic3TablePreview" as ActionKey;
  desc = "Casic3TablePreview";

  async run() {
    const projectId = app.activeProject!.id;
    const tab = new GraphTab(DiagramType.Casic3TablePreview, "装备指标", "", undefined, undefined, DiagramType.Casic3TablePreview);

    app.projectManager.getProject(projectId)?.ui.addTab(tab, true);
  }

  onSysMenuClick() {
    this.run();
  }
}
